/**
 *获取地址栏get参数;   (?后面)
 * @param {string} key
 * @returns
 */
function getParams(key) {
  let query = location.href.split("?")[1];
  //转码
  query = decodeURI(query);
  let arr = query.split("&");
  for (let i = 0; i < arr.length; i++) {
    let tempArr = arr[i].split("=");
    if (tempArr[0] == key) return tempArr[1];
  }
  return `错误，未找到相应的key` ;
}
